import 'package:flutter/material.dart';
import 'package:simple_animations/simple_animations.dart';

/// simple_animations
void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Material App Bar'),
        ),
        body: Demo1(),
      ),
    );
  }
}

class Demo1 extends StatelessWidget {
  const Demo1({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return PlayAnimation<Color>(
      tween: ColorTween(begin: Colors.red,end: Colors.blue),
      duration: Duration(seconds: 3),
      builder: (ctx,child,value){
        return Container(
          color: value,
          width: 100,
          height: 100,
        );
      },
    );
  }
}

